<?php

require_once($_SERVER['DOCUMENT_ROOT'] . "/defaultconf.mex");
MYTCONN();

if ($_POST['Gather_Type'] == 1) {
    echo 'Nº de Cliente:  ';   
    mn_field('text', 'ED', 'bns_GatherID', '', '8', '8', '', '');
    mn_field('button', 'ED', 'bns_GatherCk', 'Verificar', '', '', '', '" onclick="
	document.Gathers.action=\'_response/call.php?get=Operative/gthererprop.mex\';
	if (document.Gathers.bns_GatherID.value==' . $_POST['Gather_Client'] . ')
            {
		alert(\'O cliente nao se pode angariar a si proprio.\');
            }
        else {
                subform(\'Gathers\',\'bns_CliGthrProp3\');
             }"');
} elseif ($_POST['Gather_Type'] == 2) {
    echo 'Nº de Voucher:  '; 
    mn_field('text', 'ED', 'bns_GatherID', '', '8', '8', '', '');
    mn_field('button', 'ED', 'bns_GatherCk', 'Verificar', '', '', '', '" onclick="
        	document.Gathers.action=\'_response/call.php?get=Operative/pr_ugatherclient_2.php\';
                subform(\'Gathers\',\'bns_CliGthrProp3\');
             "');
}
?>
